<?php
echo $header;
echo $column_left;
echo $column_right;
$width_content = '98%';
if (($column_left) && ($column_right)) {
    $width_content = '48%';
} elseif (($column_left) || ($column_right)) {
    $width_content = '73%';
}
?>
<div class="content" style="width:<?php echo $width_content; ?>"><?php echo $content_top; ?>
    <div class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
            <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
    </div>
    <ul data-role="listview" data-divider-theme="a" data-inset="true">
        <li data-role="list-divider"><h1><?php echo $heading_title; ?></h1></li>
    </ul><br />
    <?php if ($success) { ?>
        <div class="success"><?php echo $success; ?></div>
    <?php } ?>
    <?php if ($error_warning) { ?>
        <div class="warning"><?php echo $error_warning; ?></div>
    <?php } ?>
    <ul data-role="listview" data-divider-theme="a" data-inset="true">
        <li data-role="list-divider"><?php echo $text_address_book; ?></li>
        <?php foreach ($addresses as $result) { ?>
            <li>
                <fieldset class="ui-grid-a">
                    <div class="ui-block-a"><?php echo $result['address']; ?></div>
                    <div class="ui-block-b">
                        <a data-icon="gear" data-role="button" href="<?php echo $result['update']; ?>" class="button"><span><?php echo $button_edit; ?></span></a>
                        <a data-icon="delete" data-role="button" href="<?php echo $result['delete']; ?>" class="button"><span><?php echo $button_delete; ?></span></a>
                    </div>
                </fieldset>
            </li>
        <?php } ?>
    </ul>
    <div class="ui-grid-a buttons">
        <div class="ui-block-a left"><a data-icon="arrow-l" data-role="button" href="<?php echo $back; ?>" class="button"><span><?php echo $button_back; ?></span></a></div>
        <div class="ui-block-b right"><a data-icon="plus" data-theme="c" data-role="button" href="<?php echo $insert; ?>" class="button"><span><?php echo $button_new_address; ?></span></a></div>
    </div>
    <?php echo $content_bottom; ?>
</div>
<?php echo $footer; ?>